package com.youlai.boot.form.model.form;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 表单任务收集对象
 *
 * @author fwj
 * @since 2025-10-27 16:47
 */
@Getter
@Setter
@Schema(description = "表单任务收集对象")
public class FormCollectTaskForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "任务ID")
    private Long id;

    @Schema(description = "任务名称")
    @NotBlank(message = "任务名称不能为空")
    @Size(max=200, message="任务名称长度不能超过200个字符")
    private String taskName;

    @Schema(description = "关联的表单ID")
    @NotNull(message = "关联的表单ID不能为空")
    private Long formId;

    @Schema(description = "任务开始时间")
    @NotNull(message = "任务开始时间不能为空")
    private LocalDateTime startTime;

    @Schema(description = "任务结束时间")
    @NotNull(message = "任务结束时间不能为空")
    private LocalDateTime endTime;

    @Schema(description = "是否允许多次填报")
    private Integer allowMultiSubmit;

    @Schema(description = "最大提交次数")
    private Integer maxSubmitCount;

    @Schema(description = "任务描述")
    private String description;

    @Schema(description = "任务填报人id")
    @NotNull(message = "任务填报人不能为空")
    private String targetIds;
}
